
class Person():
    def __init__(self,name,age) -> None:
        self._name = name
        self._age = age
        pass
    
    @property
    def name(self):
        return self._name

    @property
    def age(self):
        return self._age

    @name.setter
    def name(self,name):
        self._name = name
    
    @age.setter
    def age(self,age):
        if type(age) in (int, float):
            if age >= 0 and age <= 100:
                self._age = age
            else:
                ...
    
    def __str__(self):
        return f'{self._name}{self._age}'

if __name__ == '__main__':
    person1 = Person('wyl350','33')

    print(
        # person1,
        # person1.name,
        person1.age,
    )

    person1.name = 'wyl351'
    person1.age = 18
    print(person1)
